home *** CD-ROM | disk | FTP | other *** search
- { Component Create for Delphi }
- { Sample form for property editor - String data type }
-
- unit Edit_str;
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
- StdCtrls, ExtCtrls, Mask;
-
- type
- TStringPropDlg = class(TForm)
- OKBtn: TBitBtn;
- CancelBtn: TBitBtn;
- Bevel1: TBevel;
- MaskEdit1: TMaskEdit;
- procedure FormActivate(Sender: TObject);
- procedure OKBtnClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- { Transfer buffer for property's value }
- Value : String;
- end;
-
- var
- StringPropDlg: TStringPropDlg;
-
- implementation
-
- {$R *.DFM}
-
- procedure TStringPropDlg.FormActivate(Sender: TObject);
- begin
- MaskEdit1.Text := Value;
- MaskEdit1.SelectAll
- end;
-
- procedure TStringPropDlg.OKBtnClick(Sender: TObject);
- begin
- Value := MaskEdit1.Text;
- ModalResult := mrOK
- end;
-
- end.
-